package com.gzy.rpsm_property.mapper;

import com.gzy.rpsm_property.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
@Mapper
@Repository
public interface UserMapper {
//    通过id修改用户状态
    @Update("update user set user_status = #{user_status} where userid = #{userid}")
    int changeUserStatus(User user);
//    通过id查找用户
    @Select("select userid,username,account,idcard,gender,age,user_type,user_status,user_roomid from user where userid = #{id}")
    User queryById(int id);
}
